﻿Public Class categoryPicker

    Private openFile As New OpenFileDialog
    Private RAWArray() As String
    Private _debug As Boolean = False

    Public Sub New()

    End Sub
    Public Sub New(ByVal debug As Boolean)
        _debug = debug
    End Sub

    Public Sub loadFile(ByVal _fileName As String, ByRef _toolStripComboBoxRef As ToolStripComboBox)
        Try
            openFile.FileName = _fileName
            RAWArray = System.IO.File.ReadAllLines(openFile.FileName)

            For i As Integer = 1 To RAWArray.Length - 1 'skip the header
                _toolStripComboBoxRef.Items.Add(RAWArray(i))
            Next

        Catch ex As Exception
            If _debug Then
                MessageBox.Show("Could not load file at " & _fileName)
            End If
        End Try
       

    End Sub
End Class
